/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.xcxAdmin.entity.ZtAdmin;

/**
 * 测试数据Entity
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Table(name = "zt_trolley", alias = "a", columns = {
		@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		@Column(name = "price", attrName = "price", label = "商品价格", queryType = QueryType.EQ),
		@Column(name = "num_count", attrName = "numCount", label = "商品数量"),
		@Column(name = "status", attrName = "status", label = "状态"),
		@Column(name = "admin_id", attrName = "ztAdmin.id", label = "用户名id值"),
		@Column(name = "goods_id", attrName = "ztGoods.id", label = "物品id值"),
		@Column(name = "color_id", attrName = "ztColor.id", label = "颜色id值"),
		@Column(name = "specifications_id", attrName = "specifications.id", label = "颜色id值"),
		@Column(name = "create_date", attrName = "createDate", label = "创建时间"), }, joinTable = {
		@JoinTable(type = Type.LEFT_JOIN, entity = ZtAdmin.class, attrName = "ztAdmin", alias = "u", on = "u.id = a.admin_id", columns = {
				@Column(name = "id", label = "小程序用户编码", isPK = true),
				@Column(name = "level", label = "小程序用户名称", attrName = "level"),
				@Column(name = "memtype", label = "小程序用户名称", attrName = "memtype"),
				@Column(name = "name", label = "小程序用户名称", attrName = "name", queryType = QueryType.LIKE), }),

		@JoinTable(type = Type.LEFT_JOIN, entity = ZtColor.class, attrName = "ztColor", alias = "c", on = "c.id = a.color_id", columns = {
				@Column(name = "id", label = "颜色id", isPK = true),
				@Column(name = "img", attrName = "img", label = "颜色"),
				@Column(name = "sku", attrName = "sku", label = "sku"),
				@Column(name = "title", label = "颜色值", attrName = "title", queryType = QueryType.LIKE), }),
		
		@JoinTable(type = Type.LEFT_JOIN, entity = ZtGoods.class, attrName = "ztGoods", alias = "z", on = "z.id = a.goods_id", columns = {

				@Column(name = "id", attrName = "id", label = "编号", isPK = true),
				@Column(name = "title", attrName = "title", label = "商品名称", queryType = QueryType.LIKE),
				@Column(name = "code", attrName = "code", label = "颜色"),
				@Column(name = "spotid", attrName = "spotid", label = "渠道"),
				@Column(name = "img", attrName = "img", label = "颜色"),
				@Column(name = "freight", attrName = "freight", label = "运费"),
				@Column(name = "freight_type", attrName = "freightType", label = "运费类型"),
				
				@Column(name = "discount", attrName = "discount", label = "颜色"),
				@Column(name = "discount_price", attrName = "discountPrice", label = "颜色"),
				@Column(name = "orig_price", attrName = "origPrice", label = "颜色"),
				@Column(name = "common_price", attrName = "commonPrice", label = "颜色"),
				
				})

}, orderBy = "a.create_date DESC")
public class ZtTrolley extends DataEntity<ZtTrolley> {

	private static final long serialVersionUID = 1L;
	private Double price;
	
	private String discount;
	private Double discountPrice;
	private Double origPrice;
	private Double commonPrice;
	
	
	
	private Integer numCount;
	private String status;

	private ZtAdmin ztAdmin;
	private ZtGoods ztGoods;

	private Integer pageNum;
	private ZtColor ztColor;//颜色
	
	private ZtSpecifications specifications;//规格
	
	private Double freight;
	private String freightType;
	
	private String guige;
	
	public Double getFreight() {
		return freight;
	}

	public void setFreight(Double freight) {
		this.freight = freight;
	}

	public String getFreightType() {
		return freightType;
	}

	public void setFreightType(String freightType) {
		this.freightType = freightType;
	}

	public String getGuige() {
		return guige;
	}

	public void setGuige(String guige) {
		this.guige = guige;
	}

	public String getDiscount() {
		return discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}

	public Double getDiscountPrice() {
		return discountPrice;
	}

	public void setDiscountPrice(Double discountPrice) {
		this.discountPrice = discountPrice;
	}

	public Double getOrigPrice() {
		return origPrice;
	}

	public void setOrigPrice(Double origPrice) {
		this.origPrice = origPrice;
	}

	public Double getCommonPrice() {
		return commonPrice;
	}

	public void setCommonPrice(Double commonPrice) {
		this.commonPrice = commonPrice;
	}

	public ZtSpecifications getSpecifications() {
		return specifications;
	}

	public void setSpecifications(ZtSpecifications specifications) {
		this.specifications = specifications;
	}

	public ZtColor getZtColor() {
		return ztColor;
	}

	public void setZtColor(ZtColor ztColor) {
		this.ztColor = ztColor;
	}

	@JsonIgnore
	private Date createDate;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private Date updateDate;

	@JsonIgnore
	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getNumCount() {
		return numCount;
	}

	public void setNumCount(Integer numCount) {
		this.numCount = numCount;
	}

	@JsonIgnore
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	
	public ZtAdmin getZtAdmin() {
		return ztAdmin;
	}

	public void setZtAdmin(ZtAdmin ztAdmin) {
		this.ztAdmin = ztAdmin;
	}

	public ZtGoods getZtGoods() {
		return ztGoods;
	}

	public void setZtGoods(ZtGoods ztGoods) {
		this.ztGoods = ztGoods;
	}

}